package com.example.cp.busi;

import androidx.lifecycle.MutableLiveData;

import com.example.cp.entivity.BannerResult;
import com.example.cp.entivity.VideoResult;
import com.example.cp.mvvm.base.BaseViewModel;

public class VideoViewModel extends BaseViewModel<VideoRepo> {
    protected MutableLiveData<VideoResult> success = new MutableLiveData<>();
    protected MutableLiveData<String> fail = new MutableLiveData<>();
    public void getVideo(int page,int size){
        repo.getVideo(page,size,success,fail);
    }
    protected MutableLiveData<BannerResult> bannerSuccess = new MutableLiveData<>();
    protected MutableLiveData<String> bannerFail = new MutableLiveData<>();
    public void getBanner(){
        repo.getBanner(bannerSuccess,bannerFail);
    }
    @Override
    public VideoRepo createRepo() {
        return new VideoRepo();
    }
}
